package com.jxwifi.cloud.quickcleanserver.presenter;

import com.jxwifi.cloud.quickcleanserver.app.UrlPool;
import com.jxwifi.cloud.quickcleanserver.model.AuzImpl;
import com.jxwifi.cloud.quickcleanserver.okhttp.Params;
import com.jxwifi.cloud.quickcleanserver.view.ContactNameView;

public class ContactNamePresenter {

    private AuzImpl mAuz;

    private ContactNameView mView;

    public ContactNamePresenter(ContactNameView mView){
        this.mView=mView;
        mAuz=new AuzImpl();
    }

    public void initdata(){
        Params params=new Params();
        params.add("emergencyContactName",mView.getContactName());
        mAuz.auzpost(UrlPool.POST_UPDATE_PROFILE, params, new AuzImpl.AuzListener() {
            @Override
            public void AuzSuccess(int code, String data) {
                mView.onSuccess(code, data);
            }

            @Override
            public void AuzFailure(int errorCode, String msg) {
                mView.onFailure(errorCode, msg);
            }
        });

    }
}
